﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using DDD;
using Xunit;

namespace DokiDokiTest {
    public class TestFragShader {
        [Fact]
        public void Test_New1 () {
            var vs = new FragmentShader ("Res/Shaders/simple.frag");

            Assert.Equal (387, vs.Source.Length);
            Assert.Equal ("", vs.CompileLog);
        }

        [Fact]
        public void Test_New2 () {
            var sr = new StreamReader ("Res/Shaders/simple.frag");
            var buf = System.Text.Encoding.ASCII.GetBytes (sr.ReadToEnd ());
            var vs = new FragmentShader (new MemoryStream (buf));

            Assert.Equal (387, vs.Source.Length);
            Assert.Equal ("", vs.CompileLog);
        }
    }
}
